﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicUniversityBiz;


namespace LogicUniversity.clerks
{
    public partial class AddDepartment : System.Web.UI.Page
    {
        protected void Page_PreInit(Object sender, EventArgs e)
        {
            //(Session["Role"]
            if (Session["Role"] as string != "Clerk")
            {
                Response.Redirect("~/Login.aspx");
            }

        }
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            DepartmentMaintain dm = new DepartmentMaintain();
            dm.addDepartment(txt_deptCode.Text, txt_deptName.Text, txt_contact_Name.Text, txt_tel.Text, txt_fax.Text, txt_headName.Text, txt_collectionPoint.Text, txt_repName.Text);
            Response.Redirect("MaintainDepartment.aspx");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("MaintainDepartment.aspx");
        }
    }
}